﻿/*
 * dept的业务逻辑层
 * */
using System;
using System.Collections.Generic;
using System.Text;
using WH.NurseSys.DAL;
using WH.NurseSys.Model;

namespace WH.NurseSys.BLL
{
    public class DeptBLL
    {
        DeptDAL deptDAL = new DeptDAL();

        public bool Insert(Dept dept)
        {
            return deptDAL.Insert(dept);
        }

        public bool Delete(Guid id)
        {
            return deptDAL.Delete(id);
        }

        public List<Dept> GetList()
        {
            return deptDAL.GetList();
        }

        public Dept GetById(Guid id)
        {
            return deptDAL.GetById(id);
        }

        public bool Exist(string name)
        {
            if (deptDAL.GetByName(name) == null)
                return false;
            else
                return true;
        }

        public bool Update(Dept dept)
        {
            return deptDAL.Update(dept);
        }
    }
}
